package com.ruoyi.web.wx.service.impl;

import java.util.List;

import com.ruoyi.web.wx.entity.TrashRecordVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.wx.mapper.TrashRecordMapper;
import com.ruoyi.web.wx.entity.TrashRecord;
import com.ruoyi.web.wx.service.ITrashRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 预约记录 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-27
 */
@Service
public class TrashRecordServiceImpl implements ITrashRecordService 
{
	@Autowired
	private TrashRecordMapper trashRecordMapper;

	/**
     * 查询预约记录信息
     * 
     * @param id 预约记录ID
     * @return 预约记录信息
     */
    @Override
	public TrashRecord selectTrashRecordById(String id)
	{
	    return trashRecordMapper.selectTrashRecordById(id);
	}
	
	/**
     * 查询预约记录列表
     * 
     * @param trashRecord 预约记录信息
     * @return 预约记录集合
     */
	@Override
	public List<TrashRecord> selectTrashRecordList(TrashRecord trashRecord)
	{
	    return trashRecordMapper.selectTrashRecordList(trashRecord);
	}
	
    /**
     * 新增预约记录
     * 
     * @param trashRecord 预约记录信息
     * @return 结果
     */
	@Override
	public int insertTrashRecord(TrashRecord trashRecord)
	{
	    return trashRecordMapper.insertTrashRecord(trashRecord);
	}
	
	/**
     * 修改预约记录
     * 
     * @param trashRecord 预约记录信息
     * @return 结果
     */
	@Override
	public int updateTrashRecord(TrashRecord trashRecord)
	{
	    return trashRecordMapper.updateTrashRecord(trashRecord);
	}

	/**
     * 删除预约记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTrashRecordByIds(String ids)
	{
		return trashRecordMapper.deleteTrashRecordByIds(Convert.toStrArray(ids));
	}

    @Override
    public List<TrashRecordVO> selectTrashRecordListPage(TrashRecordVO trashRecordVO) {
	return 	trashRecordMapper.selectTrashRecordListPage(trashRecordVO);

    }

	@Override
	public List<TrashRecordVO> selectWaitOrder(String[] split, Integer from, Integer pageSize, String status) {
		return 	trashRecordMapper.selectWaitOrder(split,from,pageSize,status);
	}

	@Override
	public List<TrashRecordVO> selectTrashRecordList1(TrashRecordVO trashRecordVO) {
		return 	trashRecordMapper.selectTrashRecordList1(trashRecordVO);
	}

    @Override
    public void deleteTrashRecordByRId(String id) {
		trashRecordMapper.deleteTrashRecordByRId(id);
    }

	@Override
	public List<TrashRecordVO> selectAllCm(TrashRecordVO trashRecord) {
		return trashRecordMapper.selectAllCm( trashRecord);
	}

}
